<template>
<!-- 作业查询模块-普通信函查询页面 -->
    <div   class="fillcontain">
		<div  style="height: 100%;">
			<iframe v-show="drawer" id="show_iframe"  frameborder=0 name="showHere" scrolling=auto :src="src" width="100%" height="800vh">
				<head>
					<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
				</head>
			</iframe>
		</div>
    </div>
</template>

<script>
    import constant from '@/utils/constant';
    import {getCdfsAuthCode} from "@/api/taskCenter/taskCommon";
	import appName from "@/api/appName.js";
    export default {
        name: "error-info-list",
        data(){
            return {
                drawer:false,
                // 查询条件
                direction: 'rtl',
                src:"",
                tableData: [],
                loading: false,
            }
        },
        created(){
         this.init();
        },
        mounted(){
            // this.getList();
        },
        methods: {
            // 加载cdfs的普通信函查询
            init() {
				this.drawer = true;
				//通过字典明细表中定义的sdd_code列名称获取第三方平台路径
				const appContextUrl = JSON.parse(sessionStorage.getItem(constant.APP_CONTEXT_URL));
				if (appContextUrl == null) {
				    this.$message.error("请重新登录后重试！");
				    return;
				}
				const citicgis = appContextUrl['CITICGIS'];
                getCdfsAuthCode().then(res => {
                    if (res.resultCode == constant.SUCCESS && res.data) {
						let userID = res.data.userId;
                        let href = citicgis+`/letterimage.do?type=i&power=2&requestType=letterImage&authCode=${res.data.authCode}&loginUserId=`+userID;
						window.open(href,'_blank');
                    }else {
                        this.$message.error(res.resultMsg);
                    }
                }).catch(error => {
                    this.$message.error("获取普通信函查询结果出错");
                });
            },
        }
    }
</script>

<style lang="less" scoped>
    .fillcontain {
        padding-bottom: 0;
    }

    .contain {
        background: #b1b1b1;
        padding: 10px;
        margin-bottom: 20px;
    }

    .pagination {
        padding: 10px 20px;
        text-align: right;
    }

    .operationIcon {
        // padding: 12px;
        border: 1px solid #e5e5e5;
        border-radius: 50%;
        width: 22px;
        height: 22px;
        display: inline-block;
        cursor: pointer;
        box-shadow: 0 0 3px #f9f9f9;

        .svg-icon {
            font-size: 14px;
            fill: #68a3fc;
        }
    }

    .search_container {
        padding: 20px 20px 0 20px;
        border-top: 1px solid #e1e1e1;
    }
</style>



